﻿#include "DAAppRibbonAreaInterface.h"
#include "SARibbonMainWindow.h"
class DAAppRibbonAreaInterfacePrivate {
    DA_IMPL_PUBLIC(DAAppRibbonAreaInterface)
public:
    DAAppRibbonAreaInterfacePrivate(DAAppRibbonAreaInterface *p, SARibbonMainWindow *m, DACoreInterface *c);
public:
    DACoreInterface *_core;
    SARibbonMainWindow *_mainWindow;
};

DAAppRibbonAreaInterfacePrivate::DAAppRibbonAreaInterfacePrivate(DAAppRibbonAreaInterface *p, SARibbonMainWindow *m, DACoreInterface *c)
    : q_ptr(p)
    , _mainWindow(m)
    , _core(c)
{
}


/**
 * @brief 构造函数，必须在主窗口之后构造
 * @note 此接口的生命周期跟随SARibbonMainWindow，DAAppRibbonAreaInterface将作为SARibbonMainWindow的子对象
 * @param mainwindow
 */
DAAppRibbonAreaInterface::DAAppRibbonAreaInterface(SARibbonMainWindow *mainwindow, DACoreInterface *c)
    : QObject(mainwindow)
    , d_ptr(new DAAppRibbonAreaInterfacePrivate(this, mainwindow, c))
{
}


DAAppRibbonAreaInterface::~DAAppRibbonAreaInterface()
{
}


/**
 * @brief 获取主窗口
 * @return 返回主窗口指针
 */
SARibbonMainWindow *DAAppRibbonAreaInterface::mainWindow() const
{
    return (d_ptr->_mainWindow);
}


/**
 * @brief 返回核心接口指针
 * @return
 */
DACoreInterface *DAAppRibbonAreaInterface::core() const
{
    return (d_ptr->_core);
}


/**
 * @brief 发生语言变更时会触发此函数
 */
void DAAppRibbonAreaInterface::retranslateUi()
{
}
